<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>练习2</title>
	</head>
	<body>
		<script type="text/javascript">
			 function P(name,age,gz,adress){
				this.name=name;
				this.age=age;
				this.gz=gz;
				this.adress=adress;
				this.show=show;
			}
			 function show(){
			 		document.write("姓名："+this.name+"<br />年龄："+this.age+"<br />工作："+this.gz+"<br/>地址："+this.adress+"<br /><hr />")
			 }
			 var p1=new P("张三","22","java程序员","合肥");
			  var p2=new P("李四","22","java程序员","合肥");
			p1.show();
			p2.show();
		</script>
	</body>
</html>
